Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Simpler and more robust Makefile #451

Open
wants to merge 2 commits into
base: gh-pages
Choose a base branch
from

Conversation

maxim-belkin
Copy link
Contributor

Reworked the Makefile to make it simpler (to understand) and more robust so that people with no experience with Make would see clear error messages when something is not working.

Clear error messages require things like:

target:
ifneq (, $(TOOL))
    @$(TOOL) subcommand
else
    $(error sorry can't do)
endif

To avoid repetition, I extracted these ifneq .... endif to commands.mk and created TOOL_CMD for each TOOL.

@maxim-belkin
Copy link
Contributor Author

@fmichonneau, did you want to discuss this PR or did you want someone else to look at it?

@fmichonneau
Copy link
Contributor

Overall, I like that this approach leads to more informative error messages. I do worry about the increasing complexity of the file. It would also make things easier to manage if everything was in a file, is it possible? Finally, we need to make sure that we can run make serve and make site without requiring an internet connection (it seems that the curl call would prevent this).

@maxim-belkin
Copy link
Contributor Author

I'll rebase this PR once #473 is merged and update it as requested so that we can discuss it again.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants